package com.demo.entity.enums;

public enum CommentsStatusEnum {
    ABLE(1, "正常"),
    ENABLE(0, "删除");

    private Integer status;
    private String desc;

    CommentsStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static CommentsStatusEnum getByStatus(Integer status) {
        for (CommentsStatusEnum item : CommentsStatusEnum.values()) {
            if (item.getStatus().equals(status)) {
                return item;
            }
        }
        return null;
    }

    public Integer getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }
}
